package com.stud.framework.config.properties;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import springfox.documentation.service.Contact;

import java.util.List;

/**
 * @author sdx
 * @title
 * @desription
 * @data 2023-01-16 9:17
 */
@Data
@Component
@ConfigurationProperties(prefix = "swagger")
public class SwaggerProperties {
    /**
     * 文档开关
     */
    private Boolean enabled;

    /**
     * 设置请求的统一前缀
     */
    private String pathMapping;

    /**
     * 标头
     */
    private String title;

    /**
     * 描述
     */
    private String description;

    /**
     * 项目版本
     */
    private String version;

    /**
     * 联系方式
     */
    private Contact contact = new Contact("Stud", "https://blog.csdn.net/qq_24606273?type=blog", "929886449@qq.com");

    /**
     * 组配置
     */
    private List<Groups> groups;


    @Data
    @NoArgsConstructor
    public static class Groups {

        /**
         * 组名
         */
        private String name;

        /**
         * 基础包路径
         */
        private String basePackage;

    }
}
